<template>
  <div class="title">
    <span class="name">
      <img :src="src" alt="">
      <span>{{title}}</span>
    </span>
    <a class="more" :href="href" target="blank" v-if="isMore">更多</a>
  </div>
</template>

<script>
export default {
  name: 'areaTitle',
  props: {
    src: {
      type: String,
    },
    isMore: {
      type: Boolean,
      default: true,
    },
    title: {
      type: String,
    },
    href: {
      type: String,
      default: '',
    },
  },
};
</script>

<style lang="scss">
.title {
  height: 50px;
  padding: 16px 18px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;

  .name {
    display: flex;
    align-items: center;
    img {
      margin-right: 20px;
    }
    span {
      font-size: 16px;
    }
  }
  .more {
    color: #333;
    text-decoration-line: none;
  }
}
</style>
